Conventionally, parallel processing computers reduce the amount of time required to process instructions of a computer program. In the parallel processing computers, at least two processors simultaneously execute instructions. The conventional parallel processing computers may employ synchronization when executing to ensure proper execution of the computer program. Thus, conventional parallel processing computers are configured to handle race conditions.
For instance, if a consuming thread depends on data from a producing thread, the consuming thread must first wait until the producing thread has written the data in the memory shared by the threads. Similarly, if the consuming thread requires data before the producing thread overwrites the data, the overwrite requested by the producing thread must not occur until the data is read by the consuming thread. Special instructions, included by a developer or compiler, may be utilized by the processors to perform synchronization. The synchronization of the processors executing the threads may reduce the likelihood of these race conditions.
In some conventional parallel processing computers, static code analysis is performed to inform a developer of potential fault or race conditions. The processors parse the code to determine the existence of potential race conditions. The race conditions may include, among others, read-after-write (RAW) data hazards, write-after-write (WAW) data hazards, and write-after-read (WAR) data hazards. In turn, the developer may modify the code by reordering instructions of the computer program. The modified computer program is executed on the processors. During execution of the modified computer program, the processors avoid the previously identified race conditions. Unfortunately, static code analysis alone is unable to prevent race conditions because execution order of the modified computer program may vary during subsequent runs and the static code analysis may notify the user of false positives, e.g., identifying a race condition when one does not exist, or false negatives, e.g., not identifying a race condition when one does exist.